package com.lsx143.wordcount.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class GoodState implements Comparable<GoodState> {
    private long itemId;
    private long wEnd;
    private long count;

    @Override
    public int compareTo(GoodState o) {
        return o.count == this.count ? 1 : (int) (o.getCount() - getCount());
    }

}